#include "misc.h"

/*
 * file_stat, check if file matches mode
 * return 1 if contain, or 0 if not
 */
int file_stat(const char* file_name, mode_t mode)
{
	struct stat buf;

	if(stat(file_name, &buf) == -1)
	return 0;

	return (buf.st_mode & mode);
}
